package com.example.test84;

public class Book extends Category{
    private int id;
    private String author;
    private int price;
    private int pages;
    private String name;
    private int category_id;

    public Book() {
    }
    public Book(int id, String author, int price, int pages, String name, int category_id) {
        this.id = id;
        this.author = author;
        this.price = price;
        this.pages = pages;
        this.name = name;
        this.category_id = category_id;
    }

    public Book(int id, String category_name, int categroy_code, int id1, String author, int price, int pages, String name, int category_id) {
        super(id, category_name, categroy_code);
        this.id = id1;
        this.author = author;
        this.price = price;
        this.pages = pages;
        this.name = name;
        this.category_id = category_id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCategory_id() {
        return category_id;
    }

    public void setCategory_id(int category_id) {
        this.category_id = category_id;
    }

    @Override
    public String toString() {
        return
                "id=" + id +
                        ", author='" + author + '\'' +
                        ", price=" + price +
                        ", pages=" + pages +
                        ", name='" + name + '\'' +
                        ", category_id=" + category_id
                ;
    }
}
